/*
 * Copyright 2010-2011 ESunny.com All right reserved. This software is the confidential and proprietary information of
 * ESunny.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the license agreement you entered into with ESunny.com.
 */
package com.xjt.query.action.json;

import com.xjt.cache.RegionCache;
import com.xjt.query.entity.RetModel;

/**
 * 地区json相关Acion
 * 
 * @author Jet Xu 2012-8-7 下午4:03:37
 */
public class RegionJsonAction extends JosnBaseAction {

    private static final long serialVersionUID = -7408574455163998725L;

    private Long              parentId;

    /**
     * 获取子结点的地区信息(根据地区ID)
     */
    public void querySubRegionList() {
        RetModel model = null;
        if (null != parentId) {
            model = getReturnModel(RegionCache.getChildrenList(parentId));
        }
        this.write(getReturnString(model));
    }

    /**
     * @return the parentId
     */
    public Long getParentId() {
        return parentId;
    }

    /**
     * @param parentId the parentId to set
     */
    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

}
